package UseCollection.UseList.ArrayList01;

import java.util.ArrayList;

public class ArrayListPractice01 {
    public static void main(String[] args) {
        ArrayList<String> arr = new ArrayList<>();
        arr.add("我");
        arr.add("喜欢");
        arr.add("你");
        System.out.print("[");
        for (int i = 0; i < arr.size(); i++) {
            if(i == arr.size()-1){
                System.out.print(arr.get(i));
            }else {
                System.out.print(arr.get(i)+",");
            }
        }
        System.out.println("]");
    }
}
